<?php/** * TravelCRM * * An open source CRM system for travel agencies * * @package		Core * @author		mazvv * @license		GNU GPLv3 (http://gplv3.fsf.org)  * @link		http://code.google.com/p/travelcrm/ *//** * Abstract model class, base for all documents models *  * @author mazvv * @package Libraries * @subpackage Core */include_once APPPATH."libraries/core/Crmmodel.php";abstract class Docmodel extends Crmmodel{		public function __construct() {		parent::__construct();	}
	public function remove_items(){		$this->db->trans_begin();		foreach($this->ci->input->post('row') as $rid){			$this->db->delete('_documents', array('rid'=>$rid));			}		if ($this->db->trans_status() === FALSE){    		$this->db->trans_rollback();    		return False;		}else{    		$this->db->trans_commit();    		return True;		}			}		public function move_record(){		$update_doc = array('owner_users_rid'=>get_urid_byemprid($this->ci->input->post('_employeers_rid')));		$this->db->set('modifyDT', 'now()', False);		$this->db->trans_begin();		$this->db->update('_documents', $update_doc, array('_documents.rid'=>$this->ci->input->post('rid')));		if ($this->db->trans_status() === FALSE){    		$this->db->trans_rollback();    		return False;		}else{    		$this->db->trans_commit();    		return $this->ci->input->post('rid');		}			}	}
?>